#ifndef SmtpStuDialog_H
#define SmtpStuDialog_H

#include <QDialog>
#include "QtNetwork/QTcpSocket"
#include "smtptaskthread.h"
namespace Ui {
class SmtpStuDialog;
}

class SmtpStuDialog : public QDialog
{
    Q_OBJECT
public:
    QTcpSocket * mSocket;
    // QString user = "hm01@jmtest.cn";
    // QString pass = "admin123";
    // QString user = "ggg@607.net";
    QString user = "ds03@jmtest.cn";
    QString ip = "172.16.10.30";
     QString pass = "admin123";
    int startCount = 20;
    // QString pass = "123";
    //smtp服务器默认端口是25
    int defaultPort = 25;
    SmtpTaskThread * taskThread;
    explicit SmtpStuDialog(QWidget *parent = nullptr);
    ~SmtpStuDialog();

private slots:
    void onSocketReceiveData();
    void fillBody(QString subject);
    void on_pushButton_3_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_5_clicked();

    void on_btn_sendCmd_clicked();

    void on_pushButton_8_clicked();

    void on_pushButton_9_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_10_clicked();

    void on_pushButton_11_clicked();

    void on_pushButton_12_clicked();

    void on_pushButton_13_clicked();


    void on_btn_user_clicked();

    void on_btn_pass_clicked();

    void on_btn_connect_clicked();

    void on_btn_mailIndexList_clicked();

    void on_btn_mailUidList_clicked();

    void on_btn_stat_clicked();

    void on_btn_fetchEml_clicked();

    void on_btn_getMailInfo_clicked();

    void on_btn_getMailTop_clicked();

    void on_btn_getMailUid_clicked();

    void on_btn_noop_clicked();

    void on_btn_deleteMail_clicked();

    void on_btn_quit_clicked();

    void on_btn_echo_clicked();

    void on_btn_preLogin_clicked();

    void on_btn_login_clicked();

    void on_btn_from_clicked();

    void on_btn_to_clicked();

    void on_btn_prepareBody_clicked();

    void on_btn_body_clicked();

    void on_btn_sendDragon_clicked();


private:
    Ui::SmtpStuDialog *ui;
    void sendCmd(QString cmd);
};

#endif // SmtpStuDialog
